package com.demo.service.index;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.demo.service.index.entity.IndexEntity;
import com.demo.service.index.mapper.IndexMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class IndexServiceImpl implements IndexService {

    @Autowired
    private IndexMapper mapper;
    @Override
    public List<IndexEntity> getindex() {
        Wrapper<IndexEntity> qw = new QueryWrapper<>();
        return mapper.selectList(qw);
    }

    @Override
    public void saveIndex(IndexEntity ie) {
        mapper.insert(ie);
    }
}
